package com.xiaoxi.open.design.creation.abstractfactorypattern.service.product.huawei;

import com.xiaoxi.open.design.creation.abstractfactorypattern.service.product.factory.PhoneService;
import com.xiaoxi.open.design.creation.abstractfactorypattern.service.product.factory.ProductFactory;
import com.xiaoxi.open.design.creation.abstractfactorypattern.service.product.factory.RouterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName HuaweiProductFactory
 * @Description
 * @Author xiaoxi
 * @Date 2024/5/12 20:33
 * @Version 1.0
 */
@Service
@Slf4j
public class HuaweiProductFactory implements ProductFactory {

    @Resource(name = "huaweiPhoneServiceImpl")
    private PhoneService phoneService;

    @Resource(name = "huaweiRouterServiceImpl")
    private RouterService routerService;

    @Override
    public PhoneService createPhone() {
        return phoneService;
    }

    @Override
    public RouterService createRouter() {
        return routerService;
    }

}
